import { EnumRoutePath, EnumRouteTitle } from '@/enum'
import { CustomRoute } from '@/interface'
import { BasicLayout } from '@/layouts'
import { Dashboard } from '@vicons/carbon'
import { RouteNameMap } from '../helpers'

const DASHBOARD: CustomRoute = {
  name: RouteNameMap.get('dashboard'),
  path: EnumRoutePath.dashboard,
  component: BasicLayout,
  meta: {
    title: EnumRouteTitle.dashboard,
    icon: Dashboard,
  },
  children: [
    {
      name: RouteNameMap.get('dashboard-analysis'),
      path: EnumRoutePath['dashboard-analysis'],
      component: () => import('@/views/dashboard/analysis/Analysis.vue'),
      meta: {
        title: EnumRouteTitle['dashboard-analysis'],
        keepAlive: false,
      },
    },
    {
      name: RouteNameMap.get('dashboard-workbench'),
      path: EnumRoutePath['dashboard-workbench'],
      component: () => import('@/views/dashboard/workbench/Workbench.vue'),
      meta: {
        title: EnumRouteTitle['dashboard-workbench'],
        keepAlive: true,
      },
    },
  ],
}

export default DASHBOARD
